Python Programming for Biology: Bioinformatics and Beyond by Tim J. Stevens & Wayne Boucher

Python Programming for Biology: Bioinformatics and Beyond by Tim J. Stevens & Wayne Boucher

Author:Tim J. Stevens & Wayne Boucher [Stevens, Tim J.]
Language: eng
Format: azw3, epub, pdf
Publisher: Cambridge University Press
Published: 2015-02-28T05:00:00+00:00


Using the HTSeq library

Now we come to actually using the result of a short-read to genome alignment to illustrate how the results may be analysed. For this section we will be making use of the HTSeq library, which is not a standard Python module, but which should be downloaded and installed separately.16 All of the following could be done with pure Python and its standard libraries, but by using this extra module we will be making the job much easier, and this will hopefully result in the ability to do more science. Also, we could consider using other packages like Pysam,17 which can read genomic alignments, though overall HTSeq provides more diverse functionality.

To use the HTSeq library, once it is properly installed, we simply import it into our Python programs. The imports give the ability to read several bioinformatics file formats: FASTQ for the sequence reads, SAM for the genome alignment results and GFF files which give the genome annotation information (e.g. where the genes lie in the sequence), to which we can relate the high-throughput sequencing data. The GenomicArray and GenomicInterval imports are object classes that we will use to hold the sequence information in an efficient and easily accessible manner. Next some imports are made to make graphs with the matplotlib library and the usual NumPy module to handle numeric arrays with which we can do the mathematics.

from HTSeq import FastqReader, SAM_Reader, GFF_Reader from HTSeq import GenomicArray, GenomicInterval from matplotlib import pyplot from numpy import array



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.